package com.lancoo.ccas53.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lancoo.ccas53.entity.RuleTimeProhibit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.ccas53.config.MybatisRedisCache;
import com.lancoo.ccas53.pojo.dto.ArrangeCourseRuleDto;
import com.lancoo.ccas53.pojo.dto.ArrangeRoomRuleDto;
import com.lancoo.ccas53.pojo.dto.ArrangeTeacherRuleDto;
import com.lancoo.ccas53.pojo.vo.TeacherWithRuleVo;
import com.lancoo.ccas53.pojo.vo.TeachingClassWithRuleVo;
import org.apache.ibatis.annotations.CacheNamespace;

import java.util.List;

/**
 * <p>
 * 日期禁排 Mapper 接口
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface RuleTimeProhibitMapper extends BaseMapper<RuleTimeProhibit> {

    List<Long> getTypeRuleSet(Integer taskId, int optionType);

    IPage<TeachingClassWithRuleVo> getTeachingClassListWithRule(IPage<TeachingClassWithRuleVo> page, Integer taskId,
                        String baseCollegeId, String courseTypeId, Integer courseNature, String keyword, Integer dataRange);

    List<TeachingClassWithRuleVo> getTeachingClassListWithRuleList(Integer taskId,
                                                                String baseCollegeId, String courseTypeId, Integer courseNature, String keyword, Integer dataRange);


    void removeTeachingClassRule(Integer taskId, Integer optionType, List<TeachingClassWithRuleVo> teachingClass);

    IPage<TeacherWithRuleVo> getTeacherCourseString(IPage<TeacherWithRuleVo> page, Integer taskId, String baseCollegeId, String keyword, Integer dataRange);

    List<ArrangeRoomRuleDto> getArrangeRoomRuleByTaskId(Integer taskId, int code, String collegeId);

    List<ArrangeTeacherRuleDto> getArrangeTeacherRuleByTaskId(Integer taskId, int code, String collegeId);

    List<ArrangeCourseRuleDto> getArrangeCourseRuleByTaskId(Integer taskId, int code, String collegeId);

    List<RuleTimeProhibit> getRoomRule(Integer taskId, int type);

    List<RuleTimeProhibit> getTeacherRule(Integer taskId, int type);

    void addBatch(List<RuleTimeProhibit> saveList);
}
